// Have include guard.
#ifndef FPK_XBOXJOYSTICKVALUE_HPP
#define FPK_XBOXJOYSTICKVALUE_HPP

// Include files.
#include "WPILib.h"
#include "JoystickValue.hpp"
#include "../Inputs/XboxJoystick.hpp"

/**
 *  The XboxJoystickValue struct stores the x-axis and y-axis data of each joystick on the XboxJoystick.
 */
struct XboxJoystickValue
{
	private:
		JoystickValue m_left;
		JoystickValue m_right;
	public:
		/**
		 *  Constructor for XboxJoystickValue.
		 *  
		 *  @param joystick The XboxJoystick from which to obtain the values.
		 */
		inline XboxJoystickValue(XboxJoystick &joystick) :
			m_left(joystick.GetAxisValue(XboxJoystick::kLeftX), joystick.GetAxisValue(XboxJoystick::kLeftY)),
			m_right(joystick.GetAxisValue(XboxJoystick::kRightX), joystick.GetAxisValue(XboxJoystick::kRightY))
		{
		}
		
		/**
		 *  Get the stored left JoystickValue.
		 *  
		 *  @return The stored left JoystickValue.
		 */
		inline const JoystickValue &GetLeftValue() const
		{
			return m_left;
		}
		
		/**
		 *  Get the stored right JoystickValue.
		 *  
		 *  @return The stored right JoystickValue.
		 */
		inline const JoystickValue &GetRightValue() const
		{
			return m_right;
		}
};

#endif // #ifndef FPK_XBOXJOYSTICKVALUE_HPP
